<?php
	/**
	 * This is a MetaControl class, providing a QForm or QPanel access to event handlers
	 * and QControls to perform the Create, Edit, and Delete functionality
	 * of the TablePaypalRequestOut class.  This code-generated class
	 * contains all the basic elements to help a QPanel or QForm display an HTML form that can
	 * manipulate a single TablePaypalRequestOut object.
	 *
	 * To take advantage of some (or all) of these control objects, you
	 * must create a new QForm or QPanel which instantiates a TablePaypalRequestOutMetaControl
	 * class.
	 *
	 * Any and all changes to this file will be overwritten with any subsequent
	 * code re-generation.
	 * 
	 * @package My Application
	 * @subpackage MetaControls
	 * property-read TablePaypalRequestOut $TablePaypalRequestOut the actual TablePaypalRequestOut data class being edited
	 * property QLabel $IdControl
	 * property-read QLabel $IdLabel
	 * property QIntegerTextBox $TransactionIdControl
	 * property-read QLabel $TransactionIdLabel
	 * property QIntegerTextBox $ProcessTransactionIdControl
	 * property-read QLabel $ProcessTransactionIdLabel
	 * property QListBox $UserIdControl
	 * property-read QLabel $UserIdLabel
	 * property QIntegerTextBox $CurrencyControl
	 * property-read QLabel $CurrencyLabel
	 * property QIntegerTextBox $AmountWithdrawFromSiteControl
	 * property-read QLabel $AmountWithdrawFromSiteLabel
	 * property QIntegerTextBox $AmountWithdrawFromPaypalAccountControl
	 * property-read QLabel $AmountWithdrawFromPaypalAccountLabel
	 * property QIntegerTextBox $FeePaypalControl
	 * property-read QLabel $FeePaypalLabel
	 * property QTextBox $PaypalEmailControl
	 * property-read QLabel $PaypalEmailLabel
	 * property QTextBox $UsernameControl
	 * property-read QLabel $UsernameLabel
	 * property QDateTimePicker $RequestDateControl
	 * property-read QLabel $RequestDateLabel
	 * property QDateTimePicker $ProcessDateControl
	 * property-read QLabel $ProcessDateLabel
	 * property QTextBox $TransactionIdMasspayControl
	 * property-read QLabel $TransactionIdMasspayLabel
	 * property QTextBox $TransactionIdPaypalControl
	 * property-read QLabel $TransactionIdPaypalLabel
	 * property QIntegerTextBox $StatusControl
	 * property-read QLabel $StatusLabel
	 * property QIntegerTextBox $AmountControl
	 * property-read QLabel $AmountLabel
	 * property QIntegerTextBox $ReturnedAmountControl
	 * property-read QLabel $ReturnedAmountLabel
	 * property-read string $TitleVerb a verb indicating whether or not this is being edited or created
	 * property-read boolean $EditMode a boolean indicating whether or not this is being edited or created
	 */

	class TablePaypalRequestOutMetaControlGen extends QBaseClass {
		// General Variables
		protected $objTablePaypalRequestOut;
		protected $objParentObject;
		protected $strTitleVerb;
		protected $blnEditMode;

		// Controls that allow the editing of TablePaypalRequestOut's individual data fields
		protected $lblId;
		protected $txtTransactionId;
		protected $txtProcessTransactionId;
		protected $lstUser;
		protected $txtCurrency;
		protected $txtAmountWithdrawFromSite;
		protected $txtAmountWithdrawFromPaypalAccount;
		protected $txtFeePaypal;
		protected $txtPaypalEmail;
		protected $txtUsername;
		protected $calRequestDate;
		protected $calProcessDate;
		protected $txtTransactionIdMasspay;
		protected $txtTransactionIdPaypal;
		protected $txtStatus;
		protected $txtAmount;
		protected $txtReturnedAmount;

		// Controls that allow the viewing of TablePaypalRequestOut's individual data fields
		protected $lblTransactionId;
		protected $lblProcessTransactionId;
		protected $lblUserId;
		protected $lblCurrency;
		protected $lblAmountWithdrawFromSite;
		protected $lblAmountWithdrawFromPaypalAccount;
		protected $lblFeePaypal;
		protected $lblPaypalEmail;
		protected $lblUsername;
		protected $lblRequestDate;
		protected $lblProcessDate;
		protected $lblTransactionIdMasspay;
		protected $lblTransactionIdPaypal;
		protected $lblStatus;
		protected $lblAmount;
		protected $lblReturnedAmount;

		// QListBox Controls (if applicable) to edit Unique ReverseReferences and ManyToMany References

		// QLabel Controls (if applicable) to view Unique ReverseReferences and ManyToMany References


		/**
		 * Main constructor.  Constructor OR static create methods are designed to be called in either
		 * a parent QPanel or the main QForm when wanting to create a
		 * TablePaypalRequestOutMetaControl to edit a single TablePaypalRequestOut object within the
		 * QPanel or QForm.
		 *
		 * This constructor takes in a single TablePaypalRequestOut object, while any of the static
		 * create methods below can be used to construct based off of individual PK ID(s).
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TablePaypalRequestOutMetaControl
		 * @param TablePaypalRequestOut $objTablePaypalRequestOut new or existing TablePaypalRequestOut object
		 */
		 public function __construct($objParentObject, TablePaypalRequestOut $objTablePaypalRequestOut) {
			// Setup Parent Object (e.g. QForm or QPanel which will be using this TablePaypalRequestOutMetaControl)
			$this->objParentObject = $objParentObject;

			// Setup linked TablePaypalRequestOut object
			$this->objTablePaypalRequestOut = $objTablePaypalRequestOut;

			// Figure out if we're Editing or Creating New
			if ($this->objTablePaypalRequestOut->__Restored) {
				$this->strTitleVerb = QApplication::Translate('Edit');
				$this->blnEditMode = true;
			} else {
				$this->strTitleVerb = QApplication::Translate('Create');
				$this->blnEditMode = false;
			}
		 }

		/**
		 * Static Helper Method to Create using PK arguments
		 * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
		 * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
		 * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
		 * edit, or if we are also allowed to create a new one, etc.
		 * 
		 * @param mixed $objParentObject QForm or QPanel which will be using this TablePaypalRequestOutMetaControl
		 * @param integer $intId primary key value
		 * @param QMetaControlCreateType $intCreateType rules governing TablePaypalRequestOut object creation - defaults to CreateOrEdit
 		 * @return TablePaypalRequestOutMetaControl
		 */
		public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			// Attempt to Load from PK Arguments
			if (strlen($intId)) {
				$objTablePaypalRequestOut = TablePaypalRequestOut::Load($intId);

				// TablePaypalRequestOut was found -- return it!
				if ($objTablePaypalRequestOut)
					return new TablePaypalRequestOutMetaControl($objParentObject, $objTablePaypalRequestOut);

				// If CreateOnRecordNotFound not specified, throw an exception
				else if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)
					throw new QCallerException('Could not find a TablePaypalRequestOut object with PK arguments: ' . $intId);

			// If EditOnly is specified, throw an exception
			} else if ($intCreateType == QMetaControlCreateType::EditOnly)
				throw new QCallerException('No PK arguments specified');

			// If we are here, then we need to create a new record
			return new TablePaypalRequestOutMetaControl($objParentObject, new TablePaypalRequestOut());
		}

		/**
		 * Static Helper Method to Create using PathInfo arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TablePaypalRequestOutMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TablePaypalRequestOut object creation - defaults to CreateOrEdit
		 * @return TablePaypalRequestOutMetaControl
		 */
		public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::PathInfo(0);
			return TablePaypalRequestOutMetaControl::Create($objParentObject, $intId, $intCreateType);
		}

		/**
		 * Static Helper Method to Create using QueryString arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this TablePaypalRequestOutMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing TablePaypalRequestOut object creation - defaults to CreateOrEdit
		 * @return TablePaypalRequestOutMetaControl
		 */
		public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::QueryString('intId');
			return TablePaypalRequestOutMetaControl::Create($objParentObject, $intId, $intCreateType);
		}



		///////////////////////////////////////////////
		// PUBLIC CREATE and REFRESH METHODS
		///////////////////////////////////////////////

		/**
		 * Create and setup QLabel lblId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblId_Create($strControlId = null) {
			$this->lblId = new QLabel($this->objParentObject, $strControlId);
			$this->lblId->Name = QApplication::Translate('Id');
			if ($this->blnEditMode)
				$this->lblId->Text = $this->objTablePaypalRequestOut->Id;
			else
				$this->lblId->Text = 'N/A';
			return $this->lblId;
		}

		/**
		 * Create and setup QIntegerTextBox txtTransactionId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtTransactionId_Create($strControlId = null) {
			$this->txtTransactionId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtTransactionId->Name = QApplication::Translate('Transaction Id');
			$this->txtTransactionId->Text = $this->objTablePaypalRequestOut->TransactionId;
			return $this->txtTransactionId;
		}

		/**
		 * Create and setup QLabel lblTransactionId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblTransactionId_Create($strControlId = null, $strFormat = null) {
			$this->lblTransactionId = new QLabel($this->objParentObject, $strControlId);
			$this->lblTransactionId->Name = QApplication::Translate('Transaction Id');
			$this->lblTransactionId->Text = $this->objTablePaypalRequestOut->TransactionId;
			$this->lblTransactionId->Format = $strFormat;
			return $this->lblTransactionId;
		}

		/**
		 * Create and setup QIntegerTextBox txtProcessTransactionId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtProcessTransactionId_Create($strControlId = null) {
			$this->txtProcessTransactionId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtProcessTransactionId->Name = QApplication::Translate('Process Transaction Id');
			$this->txtProcessTransactionId->Text = $this->objTablePaypalRequestOut->ProcessTransactionId;
			return $this->txtProcessTransactionId;
		}

		/**
		 * Create and setup QLabel lblProcessTransactionId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblProcessTransactionId_Create($strControlId = null, $strFormat = null) {
			$this->lblProcessTransactionId = new QLabel($this->objParentObject, $strControlId);
			$this->lblProcessTransactionId->Name = QApplication::Translate('Process Transaction Id');
			$this->lblProcessTransactionId->Text = $this->objTablePaypalRequestOut->ProcessTransactionId;
			$this->lblProcessTransactionId->Format = $strFormat;
			return $this->lblProcessTransactionId;
		}

		/**
		 * Create and setup QListBox lstUser
		 * @param string $strControlId optional ControlId to use
		 * @return QListBox
		 */
		public function lstUser_Create($strControlId = null) {
			$this->lstUser = new QListBox($this->objParentObject, $strControlId);
			$this->lstUser->Name = QApplication::Translate('User');
			$this->lstUser->Required = true;
			if (!$this->blnEditMode)
				$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
			$objUserArray = TableUserProject::LoadAll();
			if ($objUserArray) foreach ($objUserArray as $objUser) {
				$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
				if (($this->objTablePaypalRequestOut->User) && ($this->objTablePaypalRequestOut->User->Id == $objUser->Id))
					$objListItem->Selected = true;
				$this->lstUser->AddItem($objListItem);
			}
			return $this->lstUser;
		}

		/**
		 * Create and setup QLabel lblUserId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUserId_Create($strControlId = null) {
			$this->lblUserId = new QLabel($this->objParentObject, $strControlId);
			$this->lblUserId->Name = QApplication::Translate('User');
			$this->lblUserId->Text = ($this->objTablePaypalRequestOut->User) ? $this->objTablePaypalRequestOut->User->__toString() : null;
			$this->lblUserId->Required = true;
			return $this->lblUserId;
		}

		/**
		 * Create and setup QIntegerTextBox txtCurrency
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtCurrency_Create($strControlId = null) {
			$this->txtCurrency = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtCurrency->Name = QApplication::Translate('Currency');
			$this->txtCurrency->Text = $this->objTablePaypalRequestOut->Currency;
			$this->txtCurrency->Required = true;
			return $this->txtCurrency;
		}

		/**
		 * Create and setup QLabel lblCurrency
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblCurrency_Create($strControlId = null, $strFormat = null) {
			$this->lblCurrency = new QLabel($this->objParentObject, $strControlId);
			$this->lblCurrency->Name = QApplication::Translate('Currency');
			$this->lblCurrency->Text = $this->objTablePaypalRequestOut->Currency;
			$this->lblCurrency->Required = true;
			$this->lblCurrency->Format = $strFormat;
			return $this->lblCurrency;
		}

		/**
		 * Create and setup QIntegerTextBox txtAmountWithdrawFromSite
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtAmountWithdrawFromSite_Create($strControlId = null) {
			$this->txtAmountWithdrawFromSite = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtAmountWithdrawFromSite->Name = QApplication::Translate('Amount Withdraw From Site');
			$this->txtAmountWithdrawFromSite->Text = $this->objTablePaypalRequestOut->AmountWithdrawFromSite;
			$this->txtAmountWithdrawFromSite->Required = true;
			return $this->txtAmountWithdrawFromSite;
		}

		/**
		 * Create and setup QLabel lblAmountWithdrawFromSite
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblAmountWithdrawFromSite_Create($strControlId = null, $strFormat = null) {
			$this->lblAmountWithdrawFromSite = new QLabel($this->objParentObject, $strControlId);
			$this->lblAmountWithdrawFromSite->Name = QApplication::Translate('Amount Withdraw From Site');
			$this->lblAmountWithdrawFromSite->Text = $this->objTablePaypalRequestOut->AmountWithdrawFromSite;
			$this->lblAmountWithdrawFromSite->Required = true;
			$this->lblAmountWithdrawFromSite->Format = $strFormat;
			return $this->lblAmountWithdrawFromSite;
		}

		/**
		 * Create and setup QIntegerTextBox txtAmountWithdrawFromPaypalAccount
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtAmountWithdrawFromPaypalAccount_Create($strControlId = null) {
			$this->txtAmountWithdrawFromPaypalAccount = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtAmountWithdrawFromPaypalAccount->Name = QApplication::Translate('Amount Withdraw From Paypal Account');
			$this->txtAmountWithdrawFromPaypalAccount->Text = $this->objTablePaypalRequestOut->AmountWithdrawFromPaypalAccount;
			$this->txtAmountWithdrawFromPaypalAccount->Required = true;
			return $this->txtAmountWithdrawFromPaypalAccount;
		}

		/**
		 * Create and setup QLabel lblAmountWithdrawFromPaypalAccount
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblAmountWithdrawFromPaypalAccount_Create($strControlId = null, $strFormat = null) {
			$this->lblAmountWithdrawFromPaypalAccount = new QLabel($this->objParentObject, $strControlId);
			$this->lblAmountWithdrawFromPaypalAccount->Name = QApplication::Translate('Amount Withdraw From Paypal Account');
			$this->lblAmountWithdrawFromPaypalAccount->Text = $this->objTablePaypalRequestOut->AmountWithdrawFromPaypalAccount;
			$this->lblAmountWithdrawFromPaypalAccount->Required = true;
			$this->lblAmountWithdrawFromPaypalAccount->Format = $strFormat;
			return $this->lblAmountWithdrawFromPaypalAccount;
		}

		/**
		 * Create and setup QIntegerTextBox txtFeePaypal
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtFeePaypal_Create($strControlId = null) {
			$this->txtFeePaypal = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtFeePaypal->Name = QApplication::Translate('Fee Paypal');
			$this->txtFeePaypal->Text = $this->objTablePaypalRequestOut->FeePaypal;
			$this->txtFeePaypal->Required = true;
			return $this->txtFeePaypal;
		}

		/**
		 * Create and setup QLabel lblFeePaypal
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblFeePaypal_Create($strControlId = null, $strFormat = null) {
			$this->lblFeePaypal = new QLabel($this->objParentObject, $strControlId);
			$this->lblFeePaypal->Name = QApplication::Translate('Fee Paypal');
			$this->lblFeePaypal->Text = $this->objTablePaypalRequestOut->FeePaypal;
			$this->lblFeePaypal->Required = true;
			$this->lblFeePaypal->Format = $strFormat;
			return $this->lblFeePaypal;
		}

		/**
		 * Create and setup QTextBox txtPaypalEmail
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtPaypalEmail_Create($strControlId = null) {
			$this->txtPaypalEmail = new QTextBox($this->objParentObject, $strControlId);
			$this->txtPaypalEmail->Name = QApplication::Translate('Paypal Email');
			$this->txtPaypalEmail->Text = $this->objTablePaypalRequestOut->PaypalEmail;
			$this->txtPaypalEmail->Required = true;
			$this->txtPaypalEmail->MaxLength = TablePaypalRequestOut::PaypalEmailMaxLength;
			return $this->txtPaypalEmail;
		}

		/**
		 * Create and setup QLabel lblPaypalEmail
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblPaypalEmail_Create($strControlId = null) {
			$this->lblPaypalEmail = new QLabel($this->objParentObject, $strControlId);
			$this->lblPaypalEmail->Name = QApplication::Translate('Paypal Email');
			$this->lblPaypalEmail->Text = $this->objTablePaypalRequestOut->PaypalEmail;
			$this->lblPaypalEmail->Required = true;
			return $this->lblPaypalEmail;
		}

		/**
		 * Create and setup QTextBox txtUsername
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtUsername_Create($strControlId = null) {
			$this->txtUsername = new QTextBox($this->objParentObject, $strControlId);
			$this->txtUsername->Name = QApplication::Translate('Username');
			$this->txtUsername->Text = $this->objTablePaypalRequestOut->Username;
			$this->txtUsername->Required = true;
			$this->txtUsername->MaxLength = TablePaypalRequestOut::UsernameMaxLength;
			return $this->txtUsername;
		}

		/**
		 * Create and setup QLabel lblUsername
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUsername_Create($strControlId = null) {
			$this->lblUsername = new QLabel($this->objParentObject, $strControlId);
			$this->lblUsername->Name = QApplication::Translate('Username');
			$this->lblUsername->Text = $this->objTablePaypalRequestOut->Username;
			$this->lblUsername->Required = true;
			return $this->lblUsername;
		}

		/**
		 * Create and setup QDateTimePicker calRequestDate
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calRequestDate_Create($strControlId = null) {
			$this->calRequestDate = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calRequestDate->Name = QApplication::Translate('Request Date');
			$this->calRequestDate->DateTime = $this->objTablePaypalRequestOut->RequestDate;
			$this->calRequestDate->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calRequestDate;
		}

		/**
		 * Create and setup QLabel lblRequestDate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblRequestDate_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblRequestDate = new QLabel($this->objParentObject, $strControlId);
			$this->lblRequestDate->Name = QApplication::Translate('Request Date');
			$this->strRequestDateDateTimeFormat = $strDateTimeFormat;
			$this->lblRequestDate->Text = sprintf($this->objTablePaypalRequestOut->RequestDate) ? $this->objTablePaypalRequestOut->RequestDate->__toString($this->strRequestDateDateTimeFormat) : null;
			return $this->lblRequestDate;
		}

		protected $strRequestDateDateTimeFormat;


		/**
		 * Create and setup QDateTimePicker calProcessDate
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calProcessDate_Create($strControlId = null) {
			$this->calProcessDate = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calProcessDate->Name = QApplication::Translate('Process Date');
			$this->calProcessDate->DateTime = $this->objTablePaypalRequestOut->ProcessDate;
			$this->calProcessDate->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calProcessDate;
		}

		/**
		 * Create and setup QLabel lblProcessDate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblProcessDate_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblProcessDate = new QLabel($this->objParentObject, $strControlId);
			$this->lblProcessDate->Name = QApplication::Translate('Process Date');
			$this->strProcessDateDateTimeFormat = $strDateTimeFormat;
			$this->lblProcessDate->Text = sprintf($this->objTablePaypalRequestOut->ProcessDate) ? $this->objTablePaypalRequestOut->ProcessDate->__toString($this->strProcessDateDateTimeFormat) : null;
			return $this->lblProcessDate;
		}

		protected $strProcessDateDateTimeFormat;


		/**
		 * Create and setup QTextBox txtTransactionIdMasspay
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtTransactionIdMasspay_Create($strControlId = null) {
			$this->txtTransactionIdMasspay = new QTextBox($this->objParentObject, $strControlId);
			$this->txtTransactionIdMasspay->Name = QApplication::Translate('Transaction Id Masspay');
			$this->txtTransactionIdMasspay->Text = $this->objTablePaypalRequestOut->TransactionIdMasspay;
			$this->txtTransactionIdMasspay->MaxLength = TablePaypalRequestOut::TransactionIdMasspayMaxLength;
			return $this->txtTransactionIdMasspay;
		}

		/**
		 * Create and setup QLabel lblTransactionIdMasspay
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblTransactionIdMasspay_Create($strControlId = null) {
			$this->lblTransactionIdMasspay = new QLabel($this->objParentObject, $strControlId);
			$this->lblTransactionIdMasspay->Name = QApplication::Translate('Transaction Id Masspay');
			$this->lblTransactionIdMasspay->Text = $this->objTablePaypalRequestOut->TransactionIdMasspay;
			return $this->lblTransactionIdMasspay;
		}

		/**
		 * Create and setup QTextBox txtTransactionIdPaypal
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtTransactionIdPaypal_Create($strControlId = null) {
			$this->txtTransactionIdPaypal = new QTextBox($this->objParentObject, $strControlId);
			$this->txtTransactionIdPaypal->Name = QApplication::Translate('Transaction Id Paypal');
			$this->txtTransactionIdPaypal->Text = $this->objTablePaypalRequestOut->TransactionIdPaypal;
			$this->txtTransactionIdPaypal->MaxLength = TablePaypalRequestOut::TransactionIdPaypalMaxLength;
			return $this->txtTransactionIdPaypal;
		}

		/**
		 * Create and setup QLabel lblTransactionIdPaypal
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblTransactionIdPaypal_Create($strControlId = null) {
			$this->lblTransactionIdPaypal = new QLabel($this->objParentObject, $strControlId);
			$this->lblTransactionIdPaypal->Name = QApplication::Translate('Transaction Id Paypal');
			$this->lblTransactionIdPaypal->Text = $this->objTablePaypalRequestOut->TransactionIdPaypal;
			return $this->lblTransactionIdPaypal;
		}

		/**
		 * Create and setup QIntegerTextBox txtStatus
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtStatus_Create($strControlId = null) {
			$this->txtStatus = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtStatus->Name = QApplication::Translate('Status');
			$this->txtStatus->Text = $this->objTablePaypalRequestOut->Status;
			$this->txtStatus->Required = true;
			return $this->txtStatus;
		}

		/**
		 * Create and setup QLabel lblStatus
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblStatus_Create($strControlId = null, $strFormat = null) {
			$this->lblStatus = new QLabel($this->objParentObject, $strControlId);
			$this->lblStatus->Name = QApplication::Translate('Status');
			$this->lblStatus->Text = $this->objTablePaypalRequestOut->Status;
			$this->lblStatus->Required = true;
			$this->lblStatus->Format = $strFormat;
			return $this->lblStatus;
		}

		/**
		 * Create and setup QIntegerTextBox txtAmount
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtAmount_Create($strControlId = null) {
			$this->txtAmount = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtAmount->Name = QApplication::Translate('Amount');
			$this->txtAmount->Text = $this->objTablePaypalRequestOut->Amount;
			$this->txtAmount->Required = true;
			return $this->txtAmount;
		}

		/**
		 * Create and setup QLabel lblAmount
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblAmount_Create($strControlId = null, $strFormat = null) {
			$this->lblAmount = new QLabel($this->objParentObject, $strControlId);
			$this->lblAmount->Name = QApplication::Translate('Amount');
			$this->lblAmount->Text = $this->objTablePaypalRequestOut->Amount;
			$this->lblAmount->Required = true;
			$this->lblAmount->Format = $strFormat;
			return $this->lblAmount;
		}

		/**
		 * Create and setup QIntegerTextBox txtReturnedAmount
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtReturnedAmount_Create($strControlId = null) {
			$this->txtReturnedAmount = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtReturnedAmount->Name = QApplication::Translate('Returned Amount');
			$this->txtReturnedAmount->Text = $this->objTablePaypalRequestOut->ReturnedAmount;
			return $this->txtReturnedAmount;
		}

		/**
		 * Create and setup QLabel lblReturnedAmount
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblReturnedAmount_Create($strControlId = null, $strFormat = null) {
			$this->lblReturnedAmount = new QLabel($this->objParentObject, $strControlId);
			$this->lblReturnedAmount->Name = QApplication::Translate('Returned Amount');
			$this->lblReturnedAmount->Text = $this->objTablePaypalRequestOut->ReturnedAmount;
			$this->lblReturnedAmount->Format = $strFormat;
			return $this->lblReturnedAmount;
		}



		/**
		 * Refresh this MetaControl with Data from the local TablePaypalRequestOut object.
		 * @param boolean $blnReload reload TablePaypalRequestOut from the database
		 * @return void
		 */
		public function Refresh($blnReload = false) {
			if ($blnReload)
				$this->objTablePaypalRequestOut->Reload();

			if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objTablePaypalRequestOut->Id;

			if ($this->txtTransactionId) $this->txtTransactionId->Text = $this->objTablePaypalRequestOut->TransactionId;
			if ($this->lblTransactionId) $this->lblTransactionId->Text = $this->objTablePaypalRequestOut->TransactionId;

			if ($this->txtProcessTransactionId) $this->txtProcessTransactionId->Text = $this->objTablePaypalRequestOut->ProcessTransactionId;
			if ($this->lblProcessTransactionId) $this->lblProcessTransactionId->Text = $this->objTablePaypalRequestOut->ProcessTransactionId;

			if ($this->lstUser) {
					$this->lstUser->RemoveAllItems();
				if (!$this->blnEditMode)
					$this->lstUser->AddItem(QApplication::Translate('- Select One -'), null);
				$objUserArray = TableUserProject::LoadAll();
				if ($objUserArray) foreach ($objUserArray as $objUser) {
					$objListItem = new QListItem($objUser->__toString(), $objUser->Id);
					if (($this->objTablePaypalRequestOut->User) && ($this->objTablePaypalRequestOut->User->Id == $objUser->Id))
						$objListItem->Selected = true;
					$this->lstUser->AddItem($objListItem);
				}
			}
			if ($this->lblUserId) $this->lblUserId->Text = ($this->objTablePaypalRequestOut->User) ? $this->objTablePaypalRequestOut->User->__toString() : null;

			if ($this->txtCurrency) $this->txtCurrency->Text = $this->objTablePaypalRequestOut->Currency;
			if ($this->lblCurrency) $this->lblCurrency->Text = $this->objTablePaypalRequestOut->Currency;

			if ($this->txtAmountWithdrawFromSite) $this->txtAmountWithdrawFromSite->Text = $this->objTablePaypalRequestOut->AmountWithdrawFromSite;
			if ($this->lblAmountWithdrawFromSite) $this->lblAmountWithdrawFromSite->Text = $this->objTablePaypalRequestOut->AmountWithdrawFromSite;

			if ($this->txtAmountWithdrawFromPaypalAccount) $this->txtAmountWithdrawFromPaypalAccount->Text = $this->objTablePaypalRequestOut->AmountWithdrawFromPaypalAccount;
			if ($this->lblAmountWithdrawFromPaypalAccount) $this->lblAmountWithdrawFromPaypalAccount->Text = $this->objTablePaypalRequestOut->AmountWithdrawFromPaypalAccount;

			if ($this->txtFeePaypal) $this->txtFeePaypal->Text = $this->objTablePaypalRequestOut->FeePaypal;
			if ($this->lblFeePaypal) $this->lblFeePaypal->Text = $this->objTablePaypalRequestOut->FeePaypal;

			if ($this->txtPaypalEmail) $this->txtPaypalEmail->Text = $this->objTablePaypalRequestOut->PaypalEmail;
			if ($this->lblPaypalEmail) $this->lblPaypalEmail->Text = $this->objTablePaypalRequestOut->PaypalEmail;

			if ($this->txtUsername) $this->txtUsername->Text = $this->objTablePaypalRequestOut->Username;
			if ($this->lblUsername) $this->lblUsername->Text = $this->objTablePaypalRequestOut->Username;

			if ($this->calRequestDate) $this->calRequestDate->DateTime = $this->objTablePaypalRequestOut->RequestDate;
			if ($this->lblRequestDate) $this->lblRequestDate->Text = sprintf($this->objTablePaypalRequestOut->RequestDate) ? $this->objTablePaypalRequestOut->RequestDate->__toString($this->strRequestDateDateTimeFormat) : null;

			if ($this->calProcessDate) $this->calProcessDate->DateTime = $this->objTablePaypalRequestOut->ProcessDate;
			if ($this->lblProcessDate) $this->lblProcessDate->Text = sprintf($this->objTablePaypalRequestOut->ProcessDate) ? $this->objTablePaypalRequestOut->ProcessDate->__toString($this->strProcessDateDateTimeFormat) : null;

			if ($this->txtTransactionIdMasspay) $this->txtTransactionIdMasspay->Text = $this->objTablePaypalRequestOut->TransactionIdMasspay;
			if ($this->lblTransactionIdMasspay) $this->lblTransactionIdMasspay->Text = $this->objTablePaypalRequestOut->TransactionIdMasspay;

			if ($this->txtTransactionIdPaypal) $this->txtTransactionIdPaypal->Text = $this->objTablePaypalRequestOut->TransactionIdPaypal;
			if ($this->lblTransactionIdPaypal) $this->lblTransactionIdPaypal->Text = $this->objTablePaypalRequestOut->TransactionIdPaypal;

			if ($this->txtStatus) $this->txtStatus->Text = $this->objTablePaypalRequestOut->Status;
			if ($this->lblStatus) $this->lblStatus->Text = $this->objTablePaypalRequestOut->Status;

			if ($this->txtAmount) $this->txtAmount->Text = $this->objTablePaypalRequestOut->Amount;
			if ($this->lblAmount) $this->lblAmount->Text = $this->objTablePaypalRequestOut->Amount;

			if ($this->txtReturnedAmount) $this->txtReturnedAmount->Text = $this->objTablePaypalRequestOut->ReturnedAmount;
			if ($this->lblReturnedAmount) $this->lblReturnedAmount->Text = $this->objTablePaypalRequestOut->ReturnedAmount;

		}



		///////////////////////////////////////////////
		// PROTECTED UPDATE METHODS for ManyToManyReferences (if any)
		///////////////////////////////////////////////





		///////////////////////////////////////////////
		// PUBLIC TABLEPAYPALREQUESTOUT OBJECT MANIPULATORS
		///////////////////////////////////////////////

		/**
		 * This will save this object's TablePaypalRequestOut instance,
		 * updating only the fields which have had a control created for it.
		 */
		public function SaveTablePaypalRequestOut() {
			try {
				// Update any fields for controls that have been created
				if ($this->txtTransactionId) $this->objTablePaypalRequestOut->TransactionId = $this->txtTransactionId->Text;
				if ($this->txtProcessTransactionId) $this->objTablePaypalRequestOut->ProcessTransactionId = $this->txtProcessTransactionId->Text;
				if ($this->lstUser) $this->objTablePaypalRequestOut->UserId = $this->lstUser->SelectedValue;
				if ($this->txtCurrency) $this->objTablePaypalRequestOut->Currency = $this->txtCurrency->Text;
				if ($this->txtAmountWithdrawFromSite) $this->objTablePaypalRequestOut->AmountWithdrawFromSite = $this->txtAmountWithdrawFromSite->Text;
				if ($this->txtAmountWithdrawFromPaypalAccount) $this->objTablePaypalRequestOut->AmountWithdrawFromPaypalAccount = $this->txtAmountWithdrawFromPaypalAccount->Text;
				if ($this->txtFeePaypal) $this->objTablePaypalRequestOut->FeePaypal = $this->txtFeePaypal->Text;
				if ($this->txtPaypalEmail) $this->objTablePaypalRequestOut->PaypalEmail = $this->txtPaypalEmail->Text;
				if ($this->txtUsername) $this->objTablePaypalRequestOut->Username = $this->txtUsername->Text;
				if ($this->calRequestDate) $this->objTablePaypalRequestOut->RequestDate = $this->calRequestDate->DateTime;
				if ($this->calProcessDate) $this->objTablePaypalRequestOut->ProcessDate = $this->calProcessDate->DateTime;
				if ($this->txtTransactionIdMasspay) $this->objTablePaypalRequestOut->TransactionIdMasspay = $this->txtTransactionIdMasspay->Text;
				if ($this->txtTransactionIdPaypal) $this->objTablePaypalRequestOut->TransactionIdPaypal = $this->txtTransactionIdPaypal->Text;
				if ($this->txtStatus) $this->objTablePaypalRequestOut->Status = $this->txtStatus->Text;
				if ($this->txtAmount) $this->objTablePaypalRequestOut->Amount = $this->txtAmount->Text;
				if ($this->txtReturnedAmount) $this->objTablePaypalRequestOut->ReturnedAmount = $this->txtReturnedAmount->Text;

				// Update any UniqueReverseReferences (if any) for controls that have been created for it

				// Save the TablePaypalRequestOut object
				$this->objTablePaypalRequestOut->Save();

				// Finally, update any ManyToManyReferences (if any)
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * This will DELETE this object's TablePaypalRequestOut instance from the database.
		 * It will also unassociate itself from any ManyToManyReferences.
		 */
		public function DeleteTablePaypalRequestOut() {
			$this->objTablePaypalRequestOut->Delete();
		}		



		///////////////////////////////////////////////
		// PUBLIC GETTERS and SETTERS
		///////////////////////////////////////////////

		/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				// General MetaControlVariables
				case 'TablePaypalRequestOut': return $this->objTablePaypalRequestOut;
				case 'TitleVerb': return $this->strTitleVerb;
				case 'EditMode': return $this->blnEditMode;

				// Controls that point to TablePaypalRequestOut fields -- will be created dynamically if not yet created
				case 'IdControl':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'IdLabel':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'TransactionIdControl':
					if (!$this->txtTransactionId) return $this->txtTransactionId_Create();
					return $this->txtTransactionId;
				case 'TransactionIdLabel':
					if (!$this->lblTransactionId) return $this->lblTransactionId_Create();
					return $this->lblTransactionId;
				case 'ProcessTransactionIdControl':
					if (!$this->txtProcessTransactionId) return $this->txtProcessTransactionId_Create();
					return $this->txtProcessTransactionId;
				case 'ProcessTransactionIdLabel':
					if (!$this->lblProcessTransactionId) return $this->lblProcessTransactionId_Create();
					return $this->lblProcessTransactionId;
				case 'UserIdControl':
					if (!$this->lstUser) return $this->lstUser_Create();
					return $this->lstUser;
				case 'UserIdLabel':
					if (!$this->lblUserId) return $this->lblUserId_Create();
					return $this->lblUserId;
				case 'CurrencyControl':
					if (!$this->txtCurrency) return $this->txtCurrency_Create();
					return $this->txtCurrency;
				case 'CurrencyLabel':
					if (!$this->lblCurrency) return $this->lblCurrency_Create();
					return $this->lblCurrency;
				case 'AmountWithdrawFromSiteControl':
					if (!$this->txtAmountWithdrawFromSite) return $this->txtAmountWithdrawFromSite_Create();
					return $this->txtAmountWithdrawFromSite;
				case 'AmountWithdrawFromSiteLabel':
					if (!$this->lblAmountWithdrawFromSite) return $this->lblAmountWithdrawFromSite_Create();
					return $this->lblAmountWithdrawFromSite;
				case 'AmountWithdrawFromPaypalAccountControl':
					if (!$this->txtAmountWithdrawFromPaypalAccount) return $this->txtAmountWithdrawFromPaypalAccount_Create();
					return $this->txtAmountWithdrawFromPaypalAccount;
				case 'AmountWithdrawFromPaypalAccountLabel':
					if (!$this->lblAmountWithdrawFromPaypalAccount) return $this->lblAmountWithdrawFromPaypalAccount_Create();
					return $this->lblAmountWithdrawFromPaypalAccount;
				case 'FeePaypalControl':
					if (!$this->txtFeePaypal) return $this->txtFeePaypal_Create();
					return $this->txtFeePaypal;
				case 'FeePaypalLabel':
					if (!$this->lblFeePaypal) return $this->lblFeePaypal_Create();
					return $this->lblFeePaypal;
				case 'PaypalEmailControl':
					if (!$this->txtPaypalEmail) return $this->txtPaypalEmail_Create();
					return $this->txtPaypalEmail;
				case 'PaypalEmailLabel':
					if (!$this->lblPaypalEmail) return $this->lblPaypalEmail_Create();
					return $this->lblPaypalEmail;
				case 'UsernameControl':
					if (!$this->txtUsername) return $this->txtUsername_Create();
					return $this->txtUsername;
				case 'UsernameLabel':
					if (!$this->lblUsername) return $this->lblUsername_Create();
					return $this->lblUsername;
				case 'RequestDateControl':
					if (!$this->calRequestDate) return $this->calRequestDate_Create();
					return $this->calRequestDate;
				case 'RequestDateLabel':
					if (!$this->lblRequestDate) return $this->lblRequestDate_Create();
					return $this->lblRequestDate;
				case 'ProcessDateControl':
					if (!$this->calProcessDate) return $this->calProcessDate_Create();
					return $this->calProcessDate;
				case 'ProcessDateLabel':
					if (!$this->lblProcessDate) return $this->lblProcessDate_Create();
					return $this->lblProcessDate;
				case 'TransactionIdMasspayControl':
					if (!$this->txtTransactionIdMasspay) return $this->txtTransactionIdMasspay_Create();
					return $this->txtTransactionIdMasspay;
				case 'TransactionIdMasspayLabel':
					if (!$this->lblTransactionIdMasspay) return $this->lblTransactionIdMasspay_Create();
					return $this->lblTransactionIdMasspay;
				case 'TransactionIdPaypalControl':
					if (!$this->txtTransactionIdPaypal) return $this->txtTransactionIdPaypal_Create();
					return $this->txtTransactionIdPaypal;
				case 'TransactionIdPaypalLabel':
					if (!$this->lblTransactionIdPaypal) return $this->lblTransactionIdPaypal_Create();
					return $this->lblTransactionIdPaypal;
				case 'StatusControl':
					if (!$this->txtStatus) return $this->txtStatus_Create();
					return $this->txtStatus;
				case 'StatusLabel':
					if (!$this->lblStatus) return $this->lblStatus_Create();
					return $this->lblStatus;
				case 'AmountControl':
					if (!$this->txtAmount) return $this->txtAmount_Create();
					return $this->txtAmount;
				case 'AmountLabel':
					if (!$this->lblAmount) return $this->lblAmount_Create();
					return $this->lblAmount;
				case 'ReturnedAmountControl':
					if (!$this->txtReturnedAmount) return $this->txtReturnedAmount_Create();
					return $this->txtReturnedAmount;
				case 'ReturnedAmountLabel':
					if (!$this->lblReturnedAmount) return $this->lblReturnedAmount_Create();
					return $this->lblReturnedAmount;
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			try {
				switch ($strName) {
					// Controls that point to TablePaypalRequestOut fields
					case 'IdControl':
						return ($this->lblId = QType::Cast($mixValue, 'QControl'));
					case 'TransactionIdControl':
						return ($this->txtTransactionId = QType::Cast($mixValue, 'QControl'));
					case 'ProcessTransactionIdControl':
						return ($this->txtProcessTransactionId = QType::Cast($mixValue, 'QControl'));
					case 'UserIdControl':
						return ($this->lstUser = QType::Cast($mixValue, 'QControl'));
					case 'CurrencyControl':
						return ($this->txtCurrency = QType::Cast($mixValue, 'QControl'));
					case 'AmountWithdrawFromSiteControl':
						return ($this->txtAmountWithdrawFromSite = QType::Cast($mixValue, 'QControl'));
					case 'AmountWithdrawFromPaypalAccountControl':
						return ($this->txtAmountWithdrawFromPaypalAccount = QType::Cast($mixValue, 'QControl'));
					case 'FeePaypalControl':
						return ($this->txtFeePaypal = QType::Cast($mixValue, 'QControl'));
					case 'PaypalEmailControl':
						return ($this->txtPaypalEmail = QType::Cast($mixValue, 'QControl'));
					case 'UsernameControl':
						return ($this->txtUsername = QType::Cast($mixValue, 'QControl'));
					case 'RequestDateControl':
						return ($this->calRequestDate = QType::Cast($mixValue, 'QControl'));
					case 'ProcessDateControl':
						return ($this->calProcessDate = QType::Cast($mixValue, 'QControl'));
					case 'TransactionIdMasspayControl':
						return ($this->txtTransactionIdMasspay = QType::Cast($mixValue, 'QControl'));
					case 'TransactionIdPaypalControl':
						return ($this->txtTransactionIdPaypal = QType::Cast($mixValue, 'QControl'));
					case 'StatusControl':
						return ($this->txtStatus = QType::Cast($mixValue, 'QControl'));
					case 'AmountControl':
						return ($this->txtAmount = QType::Cast($mixValue, 'QControl'));
					case 'ReturnedAmountControl':
						return ($this->txtReturnedAmount = QType::Cast($mixValue, 'QControl'));
					default:
						return parent::__set($strName, $mixValue);
				}
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}
	}
?>